package com.desire.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description:
 * @Author: littleDesire
 * @Date: 2022-06-07 19:09
 * @Version: 1.0
 */
@RestController
@RequestMapping("/stock")
public class StockController {

    @GetMapping("/update")
    public String update() {
        System.out.println("库存更新>>>>>>>>>>>>>>>>>>>>>>");
        return "ku存";
    }

    @GetMapping("/query")
    public Map<String, Object> query() {
        Map<String, Object> map = new HashMap<>();
        map.put("name", "剃须刀");
        map.put("stock", 1100);
        return map;
    }
}
